package com.af.system.exception;

/**
 * @author : zhenyun.su
 * @since : 2018/9/13
 * @Comment: 自定义全局异常,提供API接口
 */

public class AfApiException extends AfException {
    public AfApiException() {
        super();
    }

    public AfApiException(String message) {
        super(message);
    }

    public AfApiException(Integer code, String message) {
        super(code, message, null);
    }
    public AfApiException(Integer code, String message, Object data) {
        super(code,message, data);
    }

    public static void throwException(Integer code, String message) throws AfApiException {
        throw new AfApiException(code, message);
    }
    public static void throwException(Integer code, String message, Object data) throws AfApiException {
        throw new AfApiException(code, message, data);
    }

}
